package com.android.butterknife;

import org.eclipse.jdt.annotation.Nullable;

import butterknife.ButterKnife;
import butterknife.OnClick;
import butterknife.OnLongClick;
import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.widget.Toast;

public class MainActivity extends Activity {

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		setContentView(R.layout.activity_main);
		ButterKnife.bind(this);
	}

	@Nullable
	@OnClick(R.id.btn_listview)
	void startListViewActivity() {
		startActivity(new Intent(this, ListViewActivity.class));
	}

	@Nullable
	@OnClick(R.id.btn_viewpager)
	void startViewPagerActivity() {
		startActivity(new Intent(this, ViewPagerActivity.class));
	}

	@Nullable
	@OnClick(R.id.btn_other)
	void startOtherActivity() {
		startActivity(new Intent(this, OtherActivity.class));
	}

	@Nullable
	@OnClick(R.id.btn_click)
	void testOnClick() {
		Toast.makeText(this, "Button:btn_click,点击测试 OnClick",
				Toast.LENGTH_SHORT).show();
	}

	@Nullable
	@OnLongClick(R.id.btn_click)
	boolean textOnLongClick() {
		Toast.makeText(this, "Button:btn_click,点击测试 OnLongClick",
				Toast.LENGTH_SHORT).show();
		return true;
	}

}
